package fr.afcepf.qualimetrie.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;

/**
 * The persistent class for the organisme database table.
 */
@Entity
@NamedQuery(name = "Organisme.findAll", query = "SELECT o FROM Organisme o")
public class Organisme implements Serializable {
    /**
     * serial.
     */
    private static final long serialVersionUID = 1L;

    /**
     * id.
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
    /**
     * adresse.
     */
    private String adresse;

    /**
     * nom.
     */
    private String nom;

    /**
     * stagiaires.
     */
    // bi-directional many-to-one association to Stagiaire
    @OneToMany(mappedBy = "organisme", cascade = CascadeType.ALL)
    private List<Stagiaire> stagiaires;

    /**
     * construct.
     */
    public Organisme() {
    }

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param paramId the id to set
     */
    public void setId(int paramId) {
        id = paramId;
    }

    /**
     * @return the adresse
     */
    public String getAdresse() {
        return adresse;
    }

    /**
     * @param paramAdresse the adresse to set
     */
    public void setAdresse(String paramAdresse) {
        adresse = paramAdresse;
    }

    /**
     * @return the nom
     */
    public String getNom() {
        return nom;
    }

    /**
     * @param paramNom the nom to set
     */
    public void setNom(String paramNom) {
        nom = paramNom;
    }

    /**
     * @return the stagiaires
     */
    public List<Stagiaire> getStagiaires() {
        return stagiaires;
    }

    /**
     * @param paramStagiaires the stagiaires to set
     */
    public void setStagiaires(List<Stagiaire> paramStagiaires) {
        stagiaires = paramStagiaires;
    }
}
